package com.aspose.cells;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.Signature;

class zbbm {
   PrivateKey a = null;
   Signature b = null;

   public zbbm(PrivateKey var1) {
      try {
         this.b = Signature.getInstance("SHA1withRSA");
         this.a = var1;
      } catch (Exception var3) {
         ;
      }

   }

   public byte[] a(byte[] var1) {
      try {
         this.b.initSign(this.a);
         this.b.update(var1);
         return this.b.sign();
      } catch (Exception var3) {
         return null;
      }
   }

   public static byte[] a(com.aspose.cells.b.a.d.zm var0) {
      byte[] var2 = null;

      try {
         MessageDigest var1 = MessageDigest.getInstance("sha-1");
         byte[] var3 = new byte[(int)var0.h()];
         var0.a(var3, 0, (int)var0.h());
         var1.update(var3);
         var2 = var1.digest();
      } catch (Exception var4) {
         ;
      }

      return var2;
   }

   public static byte[] b(byte[] var0) {
      byte[] var2 = null;

      try {
         MessageDigest var1 = MessageDigest.getInstance("SHA-1");
         var1.update(var0);
         var2 = var1.digest();
      } catch (NoSuchAlgorithmException var4) {
         ;
      }

      return var2;
   }
}
